home *** CD-ROM | disk | FTP | other *** search
- PXFRENAME(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFRREENNAAMMEE - Renames a file
-
- SSYYNNOOPPSSIISS
- CCHHAARRAACCTTEERR*_n _o_l_d_n_m,, _n_e_w_n_m
- IINNTTEEGGEERR _l_e_n_o_l_d,, _l_e_n_n_e_w,, _i_e_r_r_o_r
- CCAALLLL PPXXFFRREENNAAMMEE((_o_l_d_n_m,, _l_e_n_o_l_d,, _n_e_w_n_m,, _l_e_n_n_e_w,, _i_e_r_r_o_r))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFRREENNAAMMEE routine uses the rreennaammee() function to change the name of
- a file.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this routine:
-
- _o_l_d_n_m An input character variable or array element containing the
- current file name.
-
- _l_e_n_o_l_d An input integer variable containing the length of _o_l_d_n_m in
- characters. If _l_e_n_o_l_d is zero, all trailing blanks are
- removed before calling rreennaammee.
-
- _n_e_w_n_m An input character variable or array element containing the
- new name of the file.
-
- _l_e_n_n_e_w An input integer variable containing the length of _n_e_w_n_m in
- characters. If _l_e_n_n_e_w is zero, all trailing blanks are
- removed before calling rreennaammee.
-
- _i_e_r_r_o_r An output integer variable that contains zero if the
- renaming of the file was successful or nonzero if the
- renaming of the file was not completed.
-
- In addition to the errors returned by rreennaammee(2) system call, PPXXFFRREENNAAMMEE
- may return the following errors:
-
- EEIINNVVAALL If _l_e_n_o_l_d < 0 or _l_e_n_o_l_d > LLEENN((_o_l_d)) or _l_e_n_n_e_w < 0 or _l_e_n_n_e_w >
- LLEENN((_n_e_w_f).
-
- EENNOOMMEEMM If PPXXFFRREENNAAMMEE is unable to obtain memory to copy _o_l_d_n_m or
- _n_e_w_n_m.
-
- EEXXAAMMPPLLEESS
- program test
- character*(12) filea, fileb
- integer lenfila, lenfilb,ierr
- filea = 'oldname'
- fileb = 'newname'
- lenfila = 0
- lenfilb = 0
- call pxfrename(filea,lenfila,fileb,lenfilb,ierr)
- if (ierr.ne.0) then
- print *,'FAIL: error from pxfrename = ',ierr
- else
- print *,'PASS: No error from pxfrename = '
- endif
- end
-
- SSEEEE AALLSSOO
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-